package cn.merryyou.logback.api;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * @Author: gongtao
 * @Date: Created in 2018/6/1 15:54
 * @Description: 返回当前登录用户信息
 */

@RestController
@RequestMapping("/")
public class AuthUserApplication {

    /**
     * 返回当前登录信息
     * @param user
     * @return
     */
    @RequestMapping("/me")
    public Principal getCurrentLoggedInUser(Principal user){
        return user;
    }



}
